<HTML>
 <HEAD>
 <TITLE>Tool 162: SNMP Trap2</TITLE>
 </HEAD>
 <BODY BGCOLOR="#FFFFFF">
  <CENTER>   <H3>Tool 162: SNMP Trap2</H3>
  </CENTER>

  <P><H3>Description:</H3>
   <PRE>
  This tool sends a TRAPv2 to a SNMP server. It permits to alert a
  server.
  
  Parameter --version defines SNMP version to use (from 1 to 3).
  Versions 1 and 2 need --community parameter to set community name.
  Version 3 requires --username and --password. Parameter --authmd5
  indicates if md5 authentication is used. Parameters
  --authoritativeengineid, --authoritativeengineboots,
  --authoritativeenginetime, --contextengineid and --contextname are
  optional version 3 parameters.
  Parameter --display shows packets.
  
  Parameter --dst-ip is the address of remote host/server.
  Parameter --dst-port is the port number where to connect.
  Optional parameter --src-ip defines the local IP address to use.
  Optional parameter --src-port defines the local port number to use.
  Optional parameter --ip4opts permits to add IP4 options encoded as
  mixed.
  Optional parameter --ip6exts permits to add IP6 options encoded as
  mixed (first byte is the next header number).
  Optional parameters --device, --src-eth and --dst-eth permits to
  create a virtual client using fake addresses (in this case, tool have
  to be run with admin privilege in order to sniff and spoof at
  Ethernet level).
   </PRE>

  <P><H3>Synonyms:</H3>
  &nbsp;&nbsp;snmptrap<BR>

  <P><H3>Usage:</H3>
  &nbsp;&nbsp;netwox 162 -i ip [-c password] -r oid -z uint32 -n oid -t oidtype -V data [-d device] [-E eth] [-e eth] [-I ip] [-P port] [-p port] [-o ip4opts] [-O ip6exts] [-v uint32] [-m|+m] [-u login] [-w password] [-A mixed_data] [-B uint32] [-M uint32] [-C mixed_data] [-N data] [-T uint32] [-y|+y]<BR>

  <P><H3>Parameters:</H3>
<TABLE BORDER=1 CELLPADDING=4>
 <TR>
  <TD ALIGN=middle><I>parameter</I></TD>
  <TD ALIGN=middle><I>description</I></TD>
  <TD ALIGN=middle><I>example</I></TD>
 </TR>
 <TR><TD><TT>-i|--dst-ip ip</TD>
<TD>destination IP address</TD>
<TD>5.6.7.8</TD></TR>
<TR><TD><TT>-c|--community password</TD>
<TD>SNMPv1/v2 community</TD>
<TD>public</TD></TR>
<TR><TD><TT>-r|--enterprise oid</TD>
<TD>enterprise</TD>
<TD>.1.1</TD></TR>
<TR><TD><TT>-z|--timestamp uint32</TD>
<TD>timestamp</TD>
<TD>0</TD></TR>
<TR><TD><TT>-n|--oidname oid</TD>
<TD>oid name</TD>
<TD>.1.2</TD></TR>
<TR><TD><TT>-t|--oidtype oidtype</TD>
<TD>oid type (i,s,m,n,o,a,c,g,t,M,u,U)</TD>
<TD>s</TD></TR>
<TR><TD><TT>-V|--oidvalue data</TD>
<TD>oid value</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-d|--device device</TD>
<TD>device name</TD>
<TD>Eth0</TD></TR>
<TR><TD><TT>-E|--src-eth eth</TD>
<TD>source ethernet address</TD>
<TD>0:2:3:4:5:6</TD></TR>
<TR><TD><TT>-e|--dst-eth eth</TD>
<TD>destination ethernet address</TD>
<TD>0:8:9:a:b:c</TD></TR>
<TR><TD><TT>-I|--src-ip ip</TD>
<TD>source IP address</TD>
<TD>192.168.100.200</TD></TR>
<TR><TD><TT>-P|--src-port port</TD>
<TD>source port number</TD>
<TD>0</TD></TR>
<TR><TD><TT>-p|--dst-port port</TD>
<TD>destination port number</TD>
<TD>162</TD></TR>
<TR><TD><TT>-o|--ip4opts ip4opts</TD>
<TD>IPv4 options</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-O|--ip6exts ip6exts</TD>
<TD>IPv6 extensions</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-v|--version uint32</TD>
<TD>SNMP version (1, 2 or 3)</TD>
<TD>1</TD></TR>
<TR><TD><TT>-m|--md5auth|+m|--no-md5auth</TD>
<TD>SNMPv3 auth using MD5</TD>
<TD><I>This boolean is set.<BR>Use + or --no- to unset it.</I></TD></TR>
<TR><TD><TT>-u|--username login</TD>
<TD>SNMPv3 username</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-w|--password password</TD>
<TD>SNMPv3 password</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-A|--authoritativeengineid mixed_data</TD>
<TD>SNMPv3 authoritativeengineid</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-B|--authoritativeengineboots uint32</TD>
<TD>SNMPv3 authoritativeengineboots</TD>
<TD>0</TD></TR>
<TR><TD><TT>-M|--authoritativeenginetime uint32</TD>
<TD>SNMPv3 authoritativeenginetime</TD>
<TD>0</TD></TR>
<TR><TD><TT>-C|--contextengineid mixed_data</TD>
<TD>SNMPv3 contextengineid</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-N|--contextname data</TD>
<TD>SNMPv3 contextname</TD>
<TD>&nbsp;</TD></TR>
<TR><TD><TT>-T|--timeout uint32</TD>
<TD>timeout in ms</TD>
<TD>10000</TD></TR>
<TR><TD><TT>-y|--display|+y|--no-display</TD>
<TD>display packets</TD>
<TD>&nbsp; </TD></TR>
</TABLE>

  <P><H3>Examples:</H3>
  &nbsp;&nbsp;netwox 162 -i "5.6.7.8" -r ".1.1" -z "0" -n ".1.2" -t "s" -V ""<BR>
<BR>
  &nbsp;&nbsp;netwox 162 --dst-ip "5.6.7.8" --enterprise ".1.1" --timestamp "0" --oidname ".1.2" --oidtype "s" --oidvalue ""<BR>
<BR>
 </BODY>
 </HTML>
